package com.lanchetech.dao;

import com.lanchetech.bean.request.CategoryReq;import com.lanchetech.entity.Category;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface CategoryMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<Category> findAllAdminPage(CategoryReq req);

    List<Category> getTwoLevelCategoryList(@Param("type") Byte type);

    List<Category> findAllRootByType(@Param("type") Byte type);

    List<Category> findAllByType(@Param("type") Byte type);

    List<Category> findAllByPid(@Param("pid") Long pid);

    int updateDeletedById(@Param("updatedDeleted")Byte updatedDeleted,@Param("id")Long id);

    List<Category> findAllFrontCategoryList(Category record);

    List<Category> findAllBackCategoryList(Category record);

    List<Category> findAllByIds(@Param("ids")List<Long> ids);

    List<Category> getLevelTab();
}